package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 地址簿
 * </p>
 *
 * @author long
 * @since 2025-01-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_address_book")
public class AddressBookDo extends Model<AddressBookDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private Long tenantId;

    /**
     * 客户id
     */
    @TableField(value = "company_id", fill = FieldFill.INSERT)
    private Long companyId;

    /**
     * 地址名称
     */
    @ApiModelProperty("地址名称")
    @TableField("name")
    private String name;

    /**
     * 地址类型
     */
    @ApiModelProperty("地址类型")
    @TableField("address_type")
    private Integer addressType;

    /**
     * 收件人
     */
    @ApiModelProperty("收件人")
    @TableField("receiver")
    private String receiver;

    /**
     * 电话
     */
    @ApiModelProperty("电话")
    @TableField("phone")
    private String phone;

    /**
     * 邮箱
     */
    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    /**
     * 公司名称
     */
    @ApiModelProperty("公司名称")
    @TableField("company_name")
    private String companyName;

    /**
     * 公司标签
     */
    @ApiModelProperty("公司标签")
    private String companyTag;

    /**
     * 国家地区二字码
     */
    @ApiModelProperty("国家地区二字码")
    @TableField("country_region_code")
    private String countryRegionCode;

    /**
     * 省/州
     */
    @ApiModelProperty("省/州")
    @TableField("province_name")
    private String provinceName;

    /**
     * 城市名称
     */
    @ApiModelProperty("城市名称")
    @TableField("city_name")
    private String cityName;

    /**
     * 邮编
     */
    @ApiModelProperty("邮编")
    @TableField("post_code")
    private String postCode;

    /**
     * 门牌号
     */
    @ApiModelProperty("门牌号")
    @TableField("house_num")
    private String houseNum;

    /**
     * 地址1
     */
    @TableField("address1")
    private String address1;

    /**
     * 地址2
     */
    @TableField("address2")
    private String address2;

    @TableField(value = "delete_flag", fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
